import type { MockMethod } from 'vite-plugin-mock'

import { resultPageSuccess } from './_util'

const dnsServerList = Array.from({ length: 297 }, () => ({
  id: '@id',
  domain: '@domain',
  domain_addr: '@domain',
  ip: '@ip',
  parse_total: '@natural(10,100)',
  auto: '@boolean',
  remark: '@csentence',
  created_at: '@datetime',
  updated_at: '@datetime'
}))

export default [
  {
    method: 'get',
    url: '/mock/dns-server/list',
    statusCode: 200,
    response: () => {
      return resultPageSuccess(0, 10, dnsServerList)
    }
  }
] as MockMethod[]
